<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>sinnerG</title>
    <meta name="description" content="sinnerG">
    <meta name="viewport" content="width=device-width">
    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
		
        <!-- build:css({.tmp,app}) styles/main.css -->
        <link rel="stylesheet" href="styles/bootstrap.css">
        <link rel="stylesheet" href="styles/main.css">
        <!-- endbuild -->
</head>
  <body ng-app="sinnerG">
    <!--[if lt IE 7]>
      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->

    <!--[if lt IE 9]>
      <script src="bower_components/es5-shim/es5-shim.js"></script>
      <script src="bower_components/json3/lib/json3.min.js"></script>
    <![endif]-->

	<div ng-controller="AppCtrl">
	
		<div ng-show="model.user.username">
			 <div class="container" ng-view=""></div>
		</div>
		
		<div ng-hide="model.user.username">
            <div class="container">
                <div class="jumbotron">
                <div class="row">
                    <div class="loginForm">
                        <h2>Welcome to sinnerG</h2>
                        <form name="loginform" role="form" novalidate>
                            <div class="form-group">
                                <input type="text" name="username" id="username" placeholder="username" ng-model="model.username" required> 
                                <div ng-show="!loginform.$pristine && loginform.username.$invalid" class="text-danger">This field is required</div>
                            </div>
                            <div class="form-group">
                                <input type="password" name="password" id="password" placeholder="password" ng-model="model.password" required> 
                                <div ng-show="!loginform.$pristine && loginform.password.$invalid" class="text-danger">This field is required</div>
                            </div>
                            <div class="form-group">
                                <button class="btn btn-primary" ng-click="model.authenticate()" ng-disabled="loginform.$invalid">
                                Login
                                </button>
                                <div ng-show="model.errorlogin" class="text-danger">Invalid username or password</div>
                            </div>
                         </form>
                    </div>
                </div>
                </div>
            </div>             
		</div>
   </div>

    <script src="bower_components/jquery/jquery.js"></script>
    <script src="bower_components/angular/angular.js"></script>

        <!-- build:js scripts/plugins.js -->
        <!-- endbuild -->

        <!-- build:js scripts/modules.js -->
        <script src="bower_components/angular-resource/angular-resource.js"></script>
        <script src="bower_components/angular-cookies/angular-cookies.js"></script>
        <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
        <script src="bower_components/angular-route/angular-route.js"></script>
		<script src="bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js"></script>
        <!-- endbuild -->

        <!-- build:js({.tmp,app}) scripts/scripts.js -->
        <script src="scripts/app.js"></script>
        <script src="scripts/controllers/main.js"></script>
        <!-- endbuild -->
</body>
</html>
